<?php


$function = $_GET['function'];

if($function==('viewFlexDetails'))
	viewFlexDetails();
else if ($function==('viewCurrentFlexHours'))
	viewCurrentFlexHours();
	
	
	
	
	
function viewFlexDetails() {
	echo "<table id='bluetable'>";
	echo 	"<tr>";
	echo 		"<th>Date</th>";
	echo 		"<th>Start Time</th>";
	echo 		"<th>End Time</th>";
	echo 		"<th>Type</th>";
	echo 		"<th>Remarks</th>";
	echo 	"</tr>";
	echo 	"<tr>";
	echo 		"<td>28/02/2011</td>";
	echo 		"<td>0900</td>";
	echo 		"<td>-</td>";
	echo 		"<td>Card Access In</td>";
	echo 		"<td>Auto</td>";
	echo 	"</tr>";
	echo 	"<tr class='alt'>";
	echo 		"<td>28/02/2011</td>";
	echo 		"<td>-</td>";
	echo 		"<td>1600</td>";
	echo 		"<td>Card Access Out</td>";
	echo 		"<td>Auto</td>";
	echo 	"</tr>";
	echo 	"<tr>";
	echo 		"<td>29/02/2011</td>";
	echo 		"<td>0900</td>";
	echo 		"<td>-</td>";
	echo 		"<td>Card Access In</td>";
	echo 		"<td>Manual</td>";
	echo 	"</tr>";
	echo 	"<tr class='alt'>";
	echo 		"<td>28/02/2011</td>";
	echo 		"<td></td>";
	echo 		"<td>1600</td>";
	echo 		"<td>Card Access Out</td>";
	echo 		"<td>Manual</td>";
	echo 	"</tr>";
	echo 	"<tr>";
	echo 		"<td>30/02/2011</td>";
	echo 		"<td>0900</td>";
	echo 		"<td>1600</td>";
	echo 		"<td>Special Reason : Vacantion</td>";
	echo 		"<td>Going to Bali for holiday</td>";
	echo 	"</tr";
	echo 	"<tr class='alt'>";
	echo 		"<td>01/03/2011</td>";
	echo 		"<td>0900</td>";
	echo 		"<td>1100</td>";
	echo 		"<td>Special Reason : Meeting</td>";
	echo 		"<td>Meeting with abc pte ltd vendor for discussion</td>";
	echo 	"</tr";
	
	
	echo "<table>";
	
}

function viewCurrentFlexHours() {
	$personel = $_GET['personel'];
	
	
	if($personel == ('select'))
		echo "<h2>You have not select a personel to view flex-status hours for</h2>";
	else if ($personel == ('self'))
		echo "<h2>Current Flex-Status Hours : <font color='green'>10</font></h2>";
	else if ($personel == ('testing1'))
		echo "<h2>Current Flex-Status Hours : <font color='red'>-5</font></h2>";
	else if ($personel == ('testing2'))
		echo "<h2>Current Flex-Status Hours : <font color='green'>2</font></h2>";
	else if ($personel == ('testing3'))
		echo "<h2>Current Flex-Status Hours : <font color='red'>-10</font></h2>";
	
	
}

?>